#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>

/*
 * 将时间结构数据转换成经过的秒数
 */

void main()
{
  time_t timep;
  struct tm * p;

  time(&timep);
  printf("time() : %ld\n", timep);
  
  p = localtime(&timep);
  timep = mktime(p);
  
  printf("time()->localtime()->mktime() : %d\n", timep); 
}
